package com.yaj.mesif.quartz;

import cn.hutool.core.date.DateUtil;
import com.yaj.mesif.service.IFO1004Service;
import com.yaj.mesif.service.ToCanOrderService;
import lombok.extern.slf4j.Slf4j;
import org.quartz.DisallowConcurrentExecution;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.quartz.QuartzJobBean;

/**
 * @ClassName IFO1004
 * @Description 订单取消
 * @date 2021/8/24 20:46
 * @Version 1.0
 */
@Slf4j
@DisallowConcurrentExecution
public class IFO1004 extends QuartzJobBean {
    @Autowired
    private IFO1004Service ifo1004Service;

    @Override
    protected void executeInternal(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        log.info(jobExecutionContext.getJobDetail().getKey().getName() + " Start:" + DateUtil.now());
        ifo1004Service.ifo1004();
        log.info(jobExecutionContext.getJobDetail().getKey().getName() + " End:" + DateUtil.now());
    }
}
